<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="js/cdn.axios.js"></script>
    <title>Title</title>
</head>
<body>
    <h1 id="namebox"></h1>
    <button id="getDataBtn">get data</button>
    <script>
        var namebox = document.getElementById("namebox");
        axios.get("pet/getallpets").then(res =>{
            console.log(res.data);
        })
    </script>
</body>
</html>